package lab02.test03;

import java.util.Scanner;

public class Test03 {
    public static void main(String[] args) {
        Student zhangsan = new Student();
        zhangsan.name = "张三";
        zhangsan.num = "2011060111";
        zhangsan.sex = "男";
        zhangsan.age = 20;
        zhangsan.faculty = "信息与工程学院";
        zhangsan.classes = "2011级1班";

        zhangsan.computerscore = 96;
        zhangsan.mathscore = 93;
        zhangsan.englishscore = 60;

        outer:while(true) {
            System.out.println("---学生管理系统——张三：---" + "\n" +
                    "   1.查看总分" + "\n" + "   2.查看平均分" + "\n" +
                    "   3.查看最高分" + "\n" + "   4.查看最低分" + "\n" +
                    "   5.查看学生信息" + "\n" + "   6.退出" + "\n" +
                    "-------------------------");

            Scanner sc = new Scanner(System.in);
            int choose = sc.nextInt();
            switch (choose) {
                case 1:
                    zhangsan.totalScore();
                    break;
                case 2:
                    zhangsan.averageScore();
                    break;
                case 3:
                    zhangsan.maxScore();
                    break;
                case 4:
                    zhangsan.minScore();
                    break;
                case 5:
                    System.out.println(zhangsan.toString());
                    break;
                case 6:
                    break outer;
            }
        }
    }
}
